package com.lyeducation.core.video;

import com.lyeducation.controllers.dto.UpdVideoDto;
import com.lyeducation.controllers.dto.VideoDto;
import com.lyeducation.core.base.BaseDateService;
import com.lyeducation.entities.course.VideoEntity;
import com.lyeducation.util.controllerUtil.JsonResult;

import java.util.Collection;
import java.util.Map;

public interface VideoService extends BaseDateService<VideoEntity> {
    Collection<VideoEntity> findData(VideoQueryEnum o);

    VideoEntity addVideoByCallBack(Map<String, Object> ossCallbackBody);

    void addVideo(VideoDto videoDto);

    /**
     * 分页查询视频
     *
     * @param chapterId 章节
     * @param pageSize
     * @param pageNo
     * @return
     */
    JsonResult selVideoByChartId(String chapterId, int pageNo, int pageSize);

    /**
     * 通过删除章节删除该章节下的视频
     *
     * @param chapterId
     * @return
     */
    boolean delVideoByChapterId(String chapterId);

    /**
     * 更新视频基础参数
     *
     * @param videoDto
     * @return
     */
    JsonResult updVideoMsg(UpdVideoDto videoDto);
}
